package com.takeeasy.platform.persistence;

import java.sql.Connection;
import java.sql.ResultSet;
import java.util.List;

import com.takeeasy.platform.bizObject.IBizObject;

public interface IPersistenceDao {
	public Connection getConnection();
	
	public boolean excute(String sql);
	
	public boolean excute(String sql,List<?> params);

	public <E extends IBizObject> List<E> query(Class<E> bo, String sql);
	
	public ResultSet query(String sql,List<Object> params);
	
	public <T extends IBizObject> T query(Class<T> bo);
	
	public <T extends IBizObject> boolean update(Class<T> bo);
	
	public <T extends IBizObject> boolean delete(Class<T> bo);
	
	public <E extends IBizObject> List<E> paginationQuery(Class<E> bo,Page page,String sql);

	public <E extends IBizObject> List<E> query(Class<E> bo, String sql, List<Object> params);
}
